
// #include "webserver_select.hpp"
// #include "webserver_thread.hpp"
// #include "webserver_epoll.hpp"
#include "webserver_epoll_ET.hpp"
// #include "webserver_poll.hpp"

int main(int argc, char* args[])
{
    if (argc != 2)
    {
        auto it = [args]{printf("请输入port\n");};
        it();
        exit(-1);
    }
    //1.启动线程池
    ThreadPool<Thread_Task*>* st = ThreadPool<Thread_Task*>::Get_Instance(); //加载
    st->Run();  //线程池启动

    //2.启动web服务器
    std::unique_ptr<webserver> tmp(webserver::GetInstace());
    tmp->initial(atoi(args[1]), st);
    tmp->work_begin();
    return 0;
}






